package com.stx.openeyes.model;

import com.stx.openeyes.utils.HttpAdress;
import com.stx.openeyes.utils.XStringUtil;

import java.math.BigDecimal;
import java.util.Date;

public class Video {
    private Integer id;

    private String title;

    private String description;

    private Integer category;

    private String tag;

    private String url;

    private String previewImg;

    private Byte type;

    private BigDecimal price;

    private Integer duration;

    private Long createTime;

    private Integer downloanProgress = 0;

    private Integer isDownloan = 0;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getCategory() {
        return category;
    }

    public void setCategory(Integer category) {
        this.category = category;
    }

    public String getTag() {
        return tag;
    }

    public String getTagStr() {
        return XStringUtil.getFormatTag(this.tag);
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getUrl() {
        return HttpAdress.VIDEO_HOST + url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getPreviewImg() {
        return HttpAdress.IMAGE_HOST + previewImg;
    }

    public void setPreviewImg(String previewImg) {
        this.previewImg = previewImg;
    }

    public Byte getType() {
        return type;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Integer getDuration() {
        return duration;
    }

    public String getDurationStr() {
        return XStringUtil.getFormatTime(this.duration);
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public Integer getDownloanProgress() {
        return downloanProgress;
    }

    public void setDownloanProgress(Integer downloanProgress) {
        this.downloanProgress = downloanProgress;
    }

    public Integer getIsDownloan() {
        return isDownloan;
    }

    public void setIsDownloan(Integer isDownloan) {
        this.isDownloan = isDownloan;
    }
}